PHOTO BY PAOLO GAMBA
Los Angeles County, CA has a population of 10.1M people with a median age of 36.3 and a median household income of $61,338.
The tech industry ….. doing well….. Many of the most valuable companies are tehc companies
Let’s take a look at the tech industry employment [1] numbers for the past 13 years.
# add geom_hline showing "Total media wages"
# # Change the "horizontal justification" to be left-justified with hjust
mycols <- c("blue", "red")
ggplot(data=occupation, mapping=aes(x=industry, y=median_wages17, fill=compu)) +
stat_summary(fun.y=mean, geom="bar") +
scale_y_continuous(labels=dollar) +
labs(title="Median Wages by Industry in 2017", x="", y="") +
coord_flip() +
theme(legend.position="none") +
scale_fill_manual(values=mycols) +
geom_text(aes(label = median_wages17), color = "black", hjust=-0.1) +
geom_hline(yintercept = 37690, color="red", size=1, linetype="dashed")# remove all occupations
occupation <- occupation[2:23,]
occupation$industry <- fct_reorder(occupation$industry, occupation$change2026, mean, na.rm=TRUE)
ggplot(data=occupation, mapping=aes(x=industry, y=change2026, fill=compu)) +
stat_summary(fun.y=mean, geom="bar") +
scale_y_continuous() +
labs(title="Employment Jobs Growth Projection by Industry 2016-2026 ", x="", y="") +
coord_flip() +
theme(legend.position="none") +
scale_fill_manual(values=mycols) +
geom_text(aes(label = change2026), color = "black", hjust=-0.1) occupation$industry <- fct_reorder(occupation$industry, occupation$perchange206, mean, na.rm=TRUE)
ggplot(data=occupation, mapping=aes(x=industry, y=perchange206, fill=compu)) +
stat_summary(fun.y=mean, geom="bar") +
scale_y_continuous() +
labs(title="% Employment Growth Projection by Industry 2016-2026 ", x="", y="") +
coord_flip() +
theme(legend.position="none") +
scale_fill_manual(values=mycols) +
geom_text(aes(label = perchange206), color = "black", hjust=-0.1)2017 Employment by major occupational group, 2016 and projected 2026 (Numbers in thousands) [1]. Tech employees are compensated nicely due to this tech boom. For example, in 207 while the annual medialn wage for all occupations was $37,000 in the U.S., it was $84,600 for the computer occupations, second only to $102,000 of the management occupations as shown in Table 1.
# Set zero margins in plot window, so that map fits
par(mar=c(0,0,0,0))
# plot(zips.shp, lwd=0.1)
# One dot per 10 people
plotvar <- df.17$tech/10
# Calculated random dots for each zip code and store the coordinates in cadots.rand
cadots.rand <- dotsInPolys(zips.shp, as.integer(plotvar), f="random")
# Plot a specific region - zooms in LA conty
plot(zips.shp, lwd=0.1, xlim=c(-118.510000,-117.820000), ylim=c(33.710000,34.860000))
plot(cadots.rand, add=T, pch=19, cex=0.1, col="#000080", border="red") # Blue ---- "#09900d" Green# install imageMagick
# https://www.imagemagick.org/script/download.php#windows
# Tutorials
# https://ryanpeek.github.io/2016-10-19-animated-gif_maps_in_R/
# https://cran.r-project.org/web/packages/magick/vignettes/intro.html
# library(magick) # this is call to animate/read pngs
# save all png files to path folder
# create gif
# list.files(path = "C:/Users/joao_/Downloads/Gif/", pattern = "*.png", full.names = T) %>%
# map(image_read) %>% # reads each path file
# image_join() %>% # joins image
# image_animate(fps=100) %>% # animates, can opt for number of loops
# image_write("tech_100.gif") # write to current dir